Optimal. Leaf size=57 \[ \frac{\sec (e+f x) \sqrt{a \cos ^2(e+f x)} \tanh ^{-1}(\sin (e+f x))}{f}-\frac{\tan (e+f x) \sqrt{a \cos ^2(e+f x)}}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.103233, antiderivative size = 57, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.192, Rules used = {3176, 3207, 2592, 321, 206} \[ \frac{\sec (e+f x) \sqrt{a \cos ^2(e+f x)} \tanh ^{-1}(\sin (e+f x))}{f}-\frac{\tan (e+f x) \sqrt{a \cos ^2(e+f x)}}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3176
Rule 3207
Rule 2592
Rule 321
Rule 206
Rubi steps
\begin{align*} \int \sqrt{a-a \sin ^2(e+f x)} \tan ^2(e+f x) \, dx &=\int \sqrt{a \cos ^2(e+f x)} \tan ^2(e+f x) \, dx\\ &=\left (\sqrt{a \cos ^2(e+f x)} \sec (e+f x)\right ) \int \sin (e+f x) \tan (e+f x) \, dx\\ &=\frac{\left (\sqrt{a \cos ^2(e+f x)} \sec (e+f x)\right ) \operatorname{Subst}\left (\int \frac{x^2}{1-x^2} \, dx,x,\sin (e+f x)\right )}{f}\\ &=-\frac{\sqrt{a \cos ^2(e+f x)} \tan (e+f x)}{f}+\frac{\left (\sqrt{a \cos ^2(e+f x)} \sec (e+f x)\right ) \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac{\tanh ^{-1}(\sin (e+f x)) \sqrt{a \cos ^2(e+f x)} \sec (e+f x)}{f}-\frac{\sqrt{a \cos ^2(e+f x)} \tan (e+f x)}{f}\\ \end{align*}
Mathematica [A] time = 0.0461756, size = 40, normalized size = 0.7 \[ \frac{\sec (e+f x) \sqrt{a \cos ^2(e+f x)} \left (\tanh ^{-1}(\sin (e+f x))-\sin (e+f x)\right )}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 1.321, size = 54, normalized size = 1. \begin{align*} -{\frac{a\cos \left ( fx+e \right ) \left ( 2\,\sin \left ( fx+e \right ) +\ln \left ( -1+\sin \left ( fx+e \right ) \right ) -\ln \left ( 1+\sin \left ( fx+e \right ) \right ) \right ) }{2\,f}{\frac{1}{\sqrt{a \left ( \cos \left ( fx+e \right ) \right ) ^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.69868, size = 99, normalized size = 1.74 \begin{align*} \frac{\sqrt{a}{\left (\log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} + 2 \, \sin \left (f x + e\right ) + 1\right ) - \log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} - 2 \, \sin \left (f x + e\right ) + 1\right ) - 2 \, \sin \left (f x + e\right )\right )}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.69902, size = 147, normalized size = 2.58 \begin{align*} -\frac{\sqrt{a \cos \left (f x + e\right )^{2}}{\left (\log \left (-\frac{\sin \left (f x + e\right ) - 1}{\sin \left (f x + e\right ) + 1}\right ) + 2 \, \sin \left (f x + e\right )\right )}}{2 \, f \cos \left (f x + e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{- a \left (\sin{\left (e + f x \right )} - 1\right ) \left (\sin{\left (e + f x \right )} + 1\right )} \tan ^{2}{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.37759, size = 184, normalized size = 3.23 \begin{align*} -\frac{{\left (\log \left ({\left | \frac{1}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )} + \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 2 \right |}\right ) \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 1\right ) - \log \left ({\left | \frac{1}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )} + \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 2 \right |}\right ) \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 1\right ) - \frac{4 \, \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 1\right )}{\frac{1}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )} + \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}\right )} \sqrt{a}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]